/**
 * Created by lz on 2016/12/9.
 */

$(function () {
    //组
    var groupData = $(".tplgroup");
    $.post($().AbsUrlParse("/web/pushmsg/group/findAllGroup"), {}, function (res) {
        var data = res.res.data;
        if (null != data) {
            var htmopt = "<option value=''>请选择</option>";
            for (var i = 0; i < data.length; i++) {
                htmopt = htmopt + '<option value=' + data[i].groupName + '>' + data[i].groupName + '</option>';
            }
            groupData.html(htmopt);
        }
    });

    //类型
    var typeData = $(".tpltype");
    $.post($().AbsUrlParse("/web/pushmsg/type/findAllType"), {}, function (res) {
        var data = res.res.data;
        if (null != data) {
            var htmopt = "<option value=''>请选择</option>";
            for (var i = 0; i < data.length; i++) {
                htmopt = htmopt + '<option value=' + data[i].typeName + '>' + data[i].typeName + '</option>';
            }
            typeData.html(htmopt);
        }
    });

});